/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mx.itschapala.dsw2.bar.modelo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Dhavis
 */
@Entity
@Table(name = "inventario")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Inventario.findAll", query = "SELECT i FROM Inventario i"),
    @NamedQuery(name = "Inventario.findByIdInventario", query = "SELECT i FROM Inventario i WHERE i.idInventario = :idInventario"),
    @NamedQuery(name = "Inventario.findByIngresarBebida", query = "SELECT i FROM Inventario i WHERE i.ingresarBebida = :ingresarBebida"),
    @NamedQuery(name = "Inventario.findByTotalIngreso", query = "SELECT i FROM Inventario i WHERE i.totalIngreso = :totalIngreso"),
    @NamedQuery(name = "Inventario.findByTotalEgreso", query = "SELECT i FROM Inventario i WHERE i.totalEgreso = :totalEgreso")})
public class Inventario implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "idInventario")
    private Integer idInventario;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 45)
    @Column(name = "ingresarBebida")
    private String ingresarBebida;
    @Basic(optional = false)
    @NotNull
    @Column(name = "totalIngreso")
    private int totalIngreso;
    @Basic(optional = false)
    @NotNull
    @Column(name = "totalEgreso")
    private int totalEgreso;

    public Inventario() {
    }

    public Inventario(Integer idInventario) {
        this.idInventario = idInventario;
    }

    public Inventario(Integer idInventario, String ingresarBebida, int totalIngreso, int totalEgreso) {
        this.idInventario = idInventario;
        this.ingresarBebida = ingresarBebida;
        this.totalIngreso = totalIngreso;
        this.totalEgreso = totalEgreso;
    }

    public Integer getIdInventario() {
        return idInventario;
    }

    public void setIdInventario(Integer idInventario) {
        this.idInventario = idInventario;
    }

    public String getIngresarBebida() {
        return ingresarBebida;
    }

    public void setIngresarBebida(String ingresarBebida) {
        this.ingresarBebida = ingresarBebida;
    }

    public int getTotalIngreso() {
        return totalIngreso;
    }

    public void setTotalIngreso(int totalIngreso) {
        this.totalIngreso = totalIngreso;
    }

    public int getTotalEgreso() {
        return totalEgreso;
    }

    public void setTotalEgreso(int totalEgreso) {
        this.totalEgreso = totalEgreso;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idInventario != null ? idInventario.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Inventario)) {
            return false;
        }
        Inventario other = (Inventario) object;
        if ((this.idInventario == null && other.idInventario != null) || (this.idInventario != null && !this.idInventario.equals(other.idInventario))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "mx.itschapala.dsw2.bar.modelo.Inventario[ idInventario=" + idInventario + " ]";
    }
    
}
